import AppSelect from "@/components/appSelect";
import SnapShot from "@/components/snapShot";
import { Form } from "antd";
import styles from "./index.less";

import { Button } from "antd";
const { ipcRenderer } = window.require("electron");

const FormItem = Form.Item;

const Test = () => {
  const appChange = (value: any[]) => {
    console.log(value);
  };
  return (
    <div className={styles.container}>
      <div className={styles.content}>
        <Form>
          <FormItem label="解析表格">
            <Button
              onClick={() => {
                ipcRenderer.invoke("parseCsv").then((data: string) => {
                  console.log(data);
                });
              }}
            >
              解析表格
            </Button>
          </FormItem>
          <FormItem label="应用列表">
            <AppSelect onChange={appChange} />
          </FormItem>
        </Form>
        <SnapShot />
      </div>
    </div>
  );
};

export default Test;
